import request from '@/utils/request.js'

/***
 * 新闻相关
 */

// 列表
export const getNewsListApi = (params) => request({ url: `/web/news/list`, method: 'get', params })

// 获取新闻管理详细信息
export const getNewsDetailApi = (id) => request({ url: `/web/news/detail/${id}`, method: 'get', loading: true })

// 新闻点赞
export const likeApi = (data) => request({ url: `/web/news/like`, method: 'post', data })

// 取消点赞
export const cancelLikeApi = (data) => request({ url: `/web/news/cancelLike`, method: 'post', data })
